<?php
	function checkNum($num){
	  return ($num%2) ? TRUE : FALSE;
	}
?>
<div id="page-content" class="clearfix">
			
			<h1>Users</h1>
			
			<h2>Group title goes here <span>(short description)</span></h2>
			<div class="inner-box clearfix">
			
				<div id="table-block" class="wide">

					<table cellspacing="0" cellpadding="0">
					<tbody>
						<tr class="header">
							<td>ID</td>
							<td>Display Name</td>
							<td>First Name</td>
							<td>Last Name</td>
							<td>Email</td>
							<td>User level</td>
							<td>Active</td>
							<td>Last Logged In</td>
							<td>Actions</td>
						</tr>
						
						<?php $num = 0?>
						
						<?php foreach ($content as $ox_user): ?>
							
						<?php $num++?>
						
						<?php if(checkNum($num) === TRUE){?>
						
						<tr>
							<td><?=$ox_user['user_id']?>.</td>
							<td><?=$ox_user['display_name']?></td>
							<td><?=$ox_user['first_name']?></td>
							<td><?=$ox_user['last_name']?></td>
							<td><?=$ox_user['email_address']?></td>
							<td><?=$ox_user['user_level']?></td>
							
							<?php if($ox_user['active'] == '1') {?>
								<td class="true">True</td>
							<?php }else{ ?>
								<td class="false">False</td>
							<?php } ?>
							
							<td><?=$ox_user['date_last_login']?></td>
							<td class="actions">
								<a class="view" href="<?=base_url();?>admin/users/view/<?=$ox_user['user_id']?>">view</a>
								
								<?php if($this->auth->check('level',5)){?>
									 | <a class="edit" href="<?=base_url();?>admin/users/edit/<?=$ox_user['user_id']?>">edit</a> | <a class="delete" href="#">delete</a>
								<?php } ?>	
							</td>
						</tr>
						
						  
						<?php }else{ ?>
						
						<tr class="alternate">
							<td><?=$ox_user['user_id']?>.</td>
							<td><?=$ox_user['display_name']?></td>
							<td><?=$ox_user['first_name']?></td>
							<td><?=$ox_user['last_name']?></td>
							<td><?=$ox_user['email_address']?></td>
							<td><?=$ox_user['user_level']?></td>
							
							<?php if($ox_user['active'] == '1') {?>
								<td class="true">True</td>
							<?php }else{ ?>
								<td class="false">False</td>
							<?php } ?>
							
							<td><?=$ox_user['date_last_login']?></td>
							<td class="actions">
								<a class="view" href="<?=base_url();?>admin/users/view/<?=$ox_user['user_id']?>">view</a>
								
								<?php if($this->auth->check('level',5)){?>
									| <a class="edit" href="<?=base_url();?>admin/users/edit/<?=$ox_user['user_id']?>">edit</a> | <a class="delete" href="#">delete</a>
								<?php } ?>	
							</td>
						</tr>
						
						<?php } ?>
						
						<?php endforeach ?>
						
					</tbody>
				</table>
				
				</div>
			
			</div>